/**
 * Copyright(c) 2014 Xunton Solutions
 *
 * History:
 *   15-9-24 下午1:23 Created by dwzhang
 */
package com.jade.bss.weixin.api.protocol.json;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * JSON格式下的通用响应。
 *
 * @author <a href="mailto:dwzhang@xunton.com">dwzhang</a> 
 * @version 1.0 15-9-24 下午1:23
 */
public class Response implements Serializable
{
    @JsonProperty ("errcode")
    private int errorCode;

    @JsonProperty ("errmsg")
    private String errorMsg;

    public int getErrorCode()
    {
        return errorCode;
    }

    public void setErrorCode(int errorCode)
    {
        this.errorCode = errorCode;
    }

    public String getErrorMsg()
    {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg)
    {
        this.errorMsg = errorMsg;
    }

    public boolean isOK()
    {
        return errorCode == 0;
    }
}
